window.addEventListener("load",function(){
    //回到顶部
	window.addEventListener("scroll", function () {
		if (window.scrollY >= 200) {
			$("#back").style.transition = "opacity 1s";
			$("#back").style.opacity = 1;
		} else {
			$("#back").style.opacity = 0;
		}
	});
	$("#back").addEventListener("click", function () {
		window.scrollTo({ left: 0, top: 0, behavior: "smooth" });
	});

	var config = {
		selector: "#bannerBg",
		vx: 4, //小球x轴速度,正为右，负为左
		vy: 4, //小球y轴速度
		height: 2, //小球高宽，其实为正方形，所以不宜太大
		width: 2,
		count: 110, //点个数
		color: "#000", //点颜色
		stroke: "130,255,255", //线条颜色
		dist: 6000, //点吸附距离
		e_dist: 20000, //鼠标吸附加速距离
		max_conn: 10, //点到点最大连接数
	};

	//调用
	CanvasParticle(config);
})